package com.fly.estore.domain;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Fly on 2016/4/26.
 */
public class SaleInfo extends BaseDomain{

    private String saleId;

    private MemberInfo member;

    private float totalPrice;

    private float payPrice;

    private float cutrate;  //减免

    private String status;
    public final static String STATUS_NOT_CONFIRM = "not_confirm";
    public final static String STATUS_CONFIRMED = "confirmed";

    private String remark;  //备注

    private List<SaleDetail> detailList = new ArrayList<SaleDetail>();

    public String getSaleId() {
        return saleId;
    }

    public void setSaleId(String saleId) {
        this.saleId = saleId;
    }

    public MemberInfo getMember() {
        return member;
    }

    public void setMember(MemberInfo member) {
        this.member = member;
    }

    public float getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(float totalPrice) {
        this.totalPrice = totalPrice;
    }

    public float getPayPrice() {
        return payPrice;
    }

    public void setPayPrice(float payPrice) {
        this.payPrice = payPrice;
    }

    public List<SaleDetail> getDetailList() {
        return detailList;
    }

    public void setDetailList(List<SaleDetail> detailList) {
        this.detailList = detailList;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public float getCutrate() {
        return cutrate;
    }

    public void setCutrate(float cutrate) {
        this.cutrate = cutrate;
    }

    public String getStatusName(){
        String statusName = "";
        if (this.status.equals(STATUS_CONFIRMED)){
            statusName = "已确认";
        }
        else if (this.status.equals(STATUS_NOT_CONFIRM)){
            statusName = "未确认";
        }
        return statusName;
    }
}
